<?php echo $this->Html->script('JqueryNotes'); ?>
<div class="notes index">
	<h2><?php echo __('Notes'); ?></h2>
	<table cellpadding="0" cellspacing="0" id="notes" class="search">
	<thead>
	<tr>
			<!--<th><?php echo $this->Paginator->sort('id'); ?></th>-->
			<th><?php echo $this->Paginator->sort('contact_name'); ?></th>
			<th><?php echo $this->Paginator->sort('user_ID'); ?></th>
			<th><?php echo $this->Paginator->sort('notes'); ?></th>
			<th><?php echo $this->Paginator->sort('date_time'); ?></th>
			<th></th>
	</tr>
	</thead>
	<tbody>
	<?php
                             if (!empty($notes)){
                                 foreach ($notes as $note):
                             ?>
	<tr>
		<!--<td><?php echo h($note['Note']['id']); ?>&nbsp;</td>-->
		<td width="10%">
			<?php echo $this->Html->link($note['Contact']['first_name']." ".$note['Contact']['middle_name']." ".$note['Contact']['last_name'], array('controller' => 'contacts', 'action' => 'view', $note['Contact']['id'])); ?>
		</td>
		<td width="10%">
			<?php echo $this->Html->link($note['User']['username'], array('controller' => 'users', 'action' => 'view', $note['User']['id'])); ?>
		</td>
		<td width="10%"><?php echo h($note['Note']['notes']); ?>&nbsp;</td>
		<td width="10%"><?php echo h($note['Note']['date_time']); ?>&nbsp;</td>
		<td class="actions" width="10%">
        			<?php echo $this->Html->link(__('View'), array('action' => 'view', $note['Note']['id'])); ?>
        			<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $note['Note']['id'])); ?>
        			<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $note['Note']['id']), null, __('Are you sure you want to delete notes for %s?', $note['Contact']['first_name']." ".$note['Contact']['middle_name']." ".$note['Contact']['last_name'])); ?>
        		</td>
        	</tr>
        <?php
                                endforeach;
                            }else{
                            ?>
                            <tr>
                                <td>No Data Found</td>
                            </tr>
                            <?php }?>
	    </tbody>
        	</table>
        	<p>
        	<div class="addbuttons" >
                  				<ul>
                  					<li><?php echo $this->Html->link(__('New Note'), array('controller' => 'notes', 'action' => 'add')); ?> </li>
                  				</ul>
                  			</div>
                    	<p>
            	<p>
        	<!--<?php
        	echo $this->Paginator->counter(array(
        	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
        	));
        	?>	</p>
        	<div class="paging">
        	<?php
        		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
        		echo $this->Paginator->numbers(array('separator' => ''));
        		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
        	?>
        	</div>-->
        </div>
